adTempus API
PreviousUpNext
IJob::LogonSessionOptions Property

Determines the kind(s) of logon session that the job can use.

C++
__property long LogonSessionOptions;
C#
long LogonSessionOptions;
Visual Basic
Property LogonSessionOptions() As long
Default Value

The default value is LogonPreferenceEnum.Hidden1, indicating that the job will run in a hidden session.

Use a combination of the LogonPreferenceEnum values to specify which kinds of logon session are allowed, and in which order they should be tried. For example, use LogonPreferenceEnum.Interactive1|LogonPreferenceEnum.Console2|LogonPreferenceEnum.Hidden3 to specify that the job should be run in the user's interactive session if available, or the Console session if no interactive session is available, or in a hidden session if no Console session is available. 

The LogonPreferenceEnum.Specifiedn values are not valid here.

Unless there is a need for users to interact with the programs run by the job, jobs should be run in a hidden session (set LogonSessionOptions to LogonPreferenceEnum.Hidden1). If you specify interactive logon options (Interactive, Console, or Specified), note that the job will fail to execute if no interactive session is available and you have not included a Hidden option. Therefore unless the job should not be allowed to run in non-interactive mode, you should always include a Hidden option as a last resort.

adTempus API Reference version 3.0.0.0, revised 10/30/2008